import request from '@/utils/request.js'

// 获取商品详情
const getGoodsInfo = (skuId) => {
  return request({
    url: `/api/item/${skuId}`
  })
}

const addOrUpdateShopCart = (skuId,skuNum) => {
  return request({
    url: `/api/cart/addToCart/${skuId}/${skuNum}`,
    method: 'post'
  })
}

export { getGoodsInfo, addOrUpdateShopCart }
